<template>
  <div>
    <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>

  export default {

    methods:{
      //退出登录
      logout(){
        //清空值
        window.sessionStorage.clear()
        //通过编程式路由导航
        this.$router.push('/login')
      }
    }
  }
</script>

<style>

</style>
